﻿using System;
using System.Collections.Generic;
using Firefly.Framework.Windows;
using Firefly.Framework.Windows.ContentReaders;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content.Pipeline.Serialization.Compiler;

namespace Firefly.ContentPipeline.Windows
{
    [ContentTypeWriter]
    public class StretchThemePartContentWriter : ContentTypeWriter<StretchThemePart>
    {
        protected override void Write(ContentWriter output, StretchThemePart value)
        {
            WriteStretchThemePart(output, value);
        }

        public override string GetRuntimeReader(TargetPlatform targetPlatform)
        {
            return typeof(StretchThemePartContentReader).AssemblyQualifiedName;
        }

        internal static void WriteStretchThemePart(ContentWriter output, StretchThemePart value)
        {
            ThemePartContentWriter.WriteThemePart(output, value);
            output.WriteObject<Dictionary<string, List<String>>>(value.PartLists);
        }
    }
}
